perm filename MEMO8.PUB[HAL,HE] blob
sn#117129 filedate 1974-08-27 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00003 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .NEWSEC USER FEATURES, PROGRAM FORMULATION
C00012 00003 .DIA: NEWSEC EXAMPLE DIALOG WITH THE HAL SYSTEM, SAMPLE DIALOG
C00021 ENDMK
C⊗;
.NEWSEC USER FEATURES, PROGRAM FORMULATION
The HAL system is intended to be a flexible tool for the
planning of complex assembly tasks by a skilled operator. This
planning has several phases: initial preparation of the program,
removing syntactic errors from the source code, trying the program
out, and fixing discovered bugs until the program works
properly. The final stage is the production run of the
program, which can occur in a basically unsupervised mode. During
execution, however, it is still possible to interrupt the machine and
find out exactly where it is in the plan and debug it further. This
is useful for patching a program which over the course of a long
execution begins to "drift" from reality.
Thus, the user features can be divided roughly into these
parts:
.NEWSS PROGRAM FORMULATION
It is hoped that the HAL language described in some detail
earlier provides a clear and complete system in which to express
those manipulations necessary for the correct execution of an
assembly task. The structured concept of statement, made powerful by
the relatively unstructured concept of the on-monitor, should make
writing in HAL relatively easy.
One other way in which HAL can assist the programmer is that
she can have it read the current location of an arm and to use that
frame as a constant in her program. This makes programming by doing
possible. One way to put together a simple program is merely to move
the arm manually to the different locations desired, have the system
remember those locations, and then type in appropriate motion
commands between these points.
.NEWSS PROGRAM COMPILATION
The supervisor is the key to this and the following features;
it allows the user to oversee the progress of her program and fix
errors as they arise. There is a simple "supervisor language"
intended for communication with the HAL system. Some of its commands
are demonstrated in the sample dialog given in {secref dia}. One of the
commands causes compilation to begin; the parser is directed to read
some file. An option is to have console input itself used to enter
the source code; this is especially useful in causing the arm to do
something immediately. When the parser finds a syntax error, it will
give an error message, and several options will in general be
available. These include aborting the compilation, skipping to the
end of the current statement, editing the line with the system line
editor (after which the entire statement will be reparsed, if
possible), and temporarily switching to a text editor to fix the
problem (after which the entire program must be reparsed).
The expander can also find errors; these are usually semantic
errors, like generating a move to a point with undefined planning
value, not supplying enough information to a high-level primitive, or
attempting to move the same arm simultaneously in two blocks of code.
In those cases where the problem is one of insufficient information,
the expander will prompt for more, and, if possible, continue. The
user may decide not to supply that information, and in that case, the
offending statement is flushed. Some errors are so drastic as to
require complete recompilation; the user is always given the option
of switching to a text editor for major modifications.
There is a limited number of errors which the trajectory
calculator is capable of discovering. These mostly involve motions
beyond the capability of the manipulators involved. Options to the
user include making the best legal trajectory possible, causing the
trajectory to be slowed down, and putting in a null trajectory.
.NEWSS PROGRAM EXECUTION
After a program has been compiled, it resides on disk as a
load module. Any number of load modules can be loaded together; the
principal restriction is that each of them be a "top level" program.
As mentioned earlier, the loader will resolve calls between the large
(planning) computer and the small (execution) computer for those
functions which the user has decided require the computational
ability found only on the large computer.
Execution is initiated by another supervisor command issued
by the user. While the mini is executing the program, the user can
cause an interruption and examine values within the runtime system,
and modify them if she wishes. It is also possible to examine the
code generated by the compiler and modify it, but this is most likely
only of interest to system programmers. Sizable patches require
recompilation.
Sometimes hardware difficulties will cause abrupt termination
of the program; these often are due to runtime trajectory
modifications overstraining the hardware. After issuing an error
message to the user, the system behaves just as it would should it
have been interrupted manually.
It is possible, during one of these "breaks", to request that
the entire world be saved. This causes all runtime values to be
written out into a safe place, along with the current attachment
structure and the current program counters. There are several uses
for this feature: it allows the debugging of the task to stop
temporarily and to be resumed later. More important, it plants a
"safe point" in the code, so that if an error should occur later, it
is possible to back up the program to a point at which everything was
still working.
Programs which have been completely debugged can be
"unloaded", that is, saved in a dump file for execution any time in
the future.
.DIA: NEWSEC EXAMPLE DIALOG WITH THE HAL SYSTEM, SAMPLE DIALOG
Here is a sample conversation a user might have with HAL. It
demonstrates the following features: Typing in source code by hand,
requesting source code to be read from a file, immediate execution
of commands by the arm, return of values from the arm, loading
compiled code into the runtime computer, and executing that code.
The supervisor prompts with the sign "⊃". The material in
the right-hand column is explanatory.
.BEGIN
.COMMAND CHARACTER "~";
~NOFILL; NOJUST;TURN OFF "←";
%7
⊃ COMPILE TTY | Request to read in from
| console for compilation.
⊂ type <alt> when done ⊃ | Message from supervisor
MOVE YELLOW | Simple move statement
TO [(20 30 1):(π 0 0)]; | Destination
FRAME PLACE1; | Declaration
PLACE1 ← YELLOW; | Assignment
PLACE2 ← PLACE1+(0 0 5); | Assignment
⊂ OK to declare PLACE2 a FRAME? ⊃ YES | Parser error, with option.
$ | End of file (altmode)
⊂ no errors. compiled: TTY(1) ⊃ | Compiler message.
⊃ IMMEDIATE | Request for an immediate
| action
⊂ type <alt> when done ⊃ | Message from supervisor
MOVE YELLOW TO PARK $ | User wants to park the arm
⊂ done ⊃ | And does
⊃ EXECUTE | Request to execute compiled
| code
⊂ loading TTY(1) ⊃ | First, loading to be done
⊂ executing TTY(1) ⊃ | Message as execution starts
⊂ done ⊃ | Message at end of execution
⊃ READ PLACE3 ← YELLOW | Ask to read hand position
⊂ OK to declare PLACE3 a FRAME? ⊃ YES | Use of undeclared variable
⊂ PLACE3 = [(19.9, 30.1, 1.1):(3.1, 0, 0.1)] ⊃
| Indication of what was set
⊃ VALUE PLACE4 | Ask for value of variable
⊂ PLACE4 not declared. Declare it a ⊃ | User has chance to fix
⊂ Please retype command ⊃ | simple errors.
⊃ PLANVALUE V1 | Request for planning value
⊂ (V1) = (3.0, 0, 20.13) ⊃ |
⊃ PLANVALUE V1 ← (4.0, 0, 20.13) | User can change planvalues.
⊃ VALUE V1 ← (4.0, 0, 20.13) | User can change real values.
⊃ COMPILE HACK.HAL[1,LOU] | Ask for compile from file
⊂ Error in line 310 of HACK.HAL[1,LOU]. | Parser error message
THEN | Gives line with <lf>
STUP | at point of error
Option ⊃ ? | User typed "?"
I: Insert replacement text | A list of options to user
Z: Use line editor to fix |
M: Show more context | This would give entire
F: Flush to end of statement | statement
E: Switch to E | E is a text editor
S: Switch to SOS | SOS is a text editor
Q: Quit. Abort compilation |
Option ⊃ I | User chooses to insert
| replacement
⊂ type <alt> when done ⊃ | Message from supervisor
THEN STOP | "STUP" changed to "STOP"
$ | End of insertion
⊂ error in line 520 of HACK.HAL[1,LOU]. | trajectory calculator error
| message
MOVE YELLOW | Only first line of
| statement given
The desired motion goes out of bounds in joint 3
in the first segment of motion. |
| A bad motion
Option ⊃ E | User wants to edit with E.
⊂ Switching to E. To return, <CTR>XG<CR> ⊃
| Universe is saved for retry
⊂ Welcome back to HAL. | Editing done
Compilation of HACK.HAL[1,LOU] aborted⊃ | After an edit, compilation
| aborts.
⊃ COMPILE HACK.HAL[1,LOU] | Request for recompilation
⊂ No errors. Compiled: TTY(1), HACK.HAL[1,LOU] ⊃
| Compilation succeeds.
⊃ LOAD | Request to load into servo
⊂ Loaded: TTY(1), HACK.HAL[1,LOU] ⊃ |
⊃ STATUS | User wants to know where
| she is
BLUE at [(19.9, 30.1, 1.1) : (3.1, 0, 0.1)]
| Arm location
Compiled: TTY(1), HACK.HAL[1,LOU] | Compilation status
Loaded: TTY(1), HACK.HAL[1,LOU] | Runtime status
⊃ EXECUTE | Request for execution
⊂ Executing TTY(1), HACK.HAL[1,LOU] ⊃ |
⊃ STATUS | User wants to know where
| she is
BLUE at [(24.1, 30.1, 5.3) : (3.1, 0, 0)] moving
| Arm status
Interpreter at line 320 in HACK.HAL[1,LOU]
| Servo status
⊂ Interrupted by red button⊃ | Runtime error message. User
| interrupted motion.
Interpreter at line 180 of HACK.HAL[1,LOU]
| Servo status
⊃ PROCEED | Request to continue motion
⊂ Joint 4 has excessive force. | Runtime error message.
Interpreter at line 150 of HACK.HAL[1,LOU]
| Servo status
⊃ DELETE 1 | Request to delete last
| compilation
⊂ Deleting HACK.HAL from runtime | Removed from runtime
⊂ Deleting HACK.HAL from COMPILATION | Removed from world of
| compiler
⊃ E | Switch to E.
⊂ Switching to E. To return, <CTR>XG<CR>⊃
⊂ Welcome back to HAL⊃ |
⊃ COMPILE HACK.HAL[1,LOU] | Request for compilation
⊂ No errors. Compiled: TTY(1), HACK.HAL[1,LOU] ⊃
| Compilation succeeds
⊃ SAVE WORLD IN W1 | User wants world saved in
⊂ World saved in W1.WLD ⊃ | named location.
⊃ RESTORE WORLD FROM W0 | Request to restore previous
| world
⊂ W0.WLD not found ⊃ | Expander error message
⊃ RESTORE WORLD FROM W00 | Request to restore previous
| world
⊂ done |
Note: TTY(1), HACK.HAL[1,LOU] still compiled. ⊃
| This is done, but previous
| stuff is still around.
⊃ BYE | Request to leave the room.
⊂ Final status: | A final status rundown
Load modules ready: TTY(1).HLD, HACK.HLD
BLUE at [(19.9, 30.1, 1.1) : (3.1, 0, 0.1)]
Goodbye ⊃
EXIT
.%*
~ COMMAND CHARACTER ".";
.END